package com.mercycrazy.recruit.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.List;

/**
 * 映射 ipLimitUrlPath.properties 资源文件, 需要限流的 IP 的相关配置
 *
 * @author <a href="mailto:1443424326@qq.com">mercycrazy</a>
 * @since 2023-01-18
 */
@Configuration
@Data
@PropertySource(value = "classpath:ipLimitUrlPath.properties", encoding = "UTF-8") // PropertySource 默认只支持 properties, yml 需要自行支持
@ConfigurationProperties(prefix = "gateway") // prefix 必须指定, 否则无法加载
public class IpLimitConfig {

    private List<String> ipLimitUrls;
}
